package com.seek.eduservice.controller;

import com.seek.commonutils.ResponseResult;
import org.springframework.web.bind.annotation.*;

/**
 * author wml
 * Created on 2022/1/12 11:05
 */
@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin // 解决跨域
public class EduLoginController {

    // login
    @PostMapping("login")
    public ResponseResult login() {
        return ResponseResult.ok().data("token", "admin");
    }

    // info
    @GetMapping("info")
    public ResponseResult info() {
        return ResponseResult.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
